package a2022.a20220915;

/**
 * @author lenovo
 * @date 2022/9/15
 */
public class a {
    public int flipLights(int n, int presses) {
        if(presses==0)return 1;
        if(n==1)return 2;
        if(n==2)return (presses==1)?3:4;
        return (presses>2)?8:(presses==1)?4:7;
    }
}
